package priv.yiyuan.example.design.visitor;

/**
 * 访问者实现类： 核心配置处理访问者
 *
 * @author YiYuan
 * @data 2025/8/4
 * @apoNote
 */
public class CoreConfigProcessor implements ConfigurationVisitor {

    @Override
    public void visit(DatabaseConfig element) {
        System.out.println("Processing Database Config: URL=" + element.getUrl() + ", Username=" + element.getUsername());
    }

    @Override
    public void visit(NetworkConfig element) {
        System.out.println("Processing Network Config: IP=" + element.getIpAddress() + ", Port=" + element.getPort());
    }
}
